<?php
// add title
$skill = elgg_extract ( 'entity', $vars, FALSE );
if ($skill) {
	$title = $skill->title;
	$rate = $skill->rate;
	$descp = $skill->description;
	
	$skill_guid = elgg_view ( 'input/hidden', array (
			'name' => "skill_guid",
			'value' => "$skill->guid"
	) );
}

$title_label = elgg_echo ( 'Tên kĩ năng' ) . elgg_echo ( 'resume:*' );
$title_input = elgg_view ( 'input/text', array (
		'name' => 'title',
		'value' => "$title" 
) );

// // Description
$descp_label = elgg_echo ( 'Mô tả về kĩ năng' );
$descp_input = elgg_view ( 'input/longtext', array (
		'name' => 'description',
		'value' => $descp 
) );

$rate_label = elgg_echo ( 'Tự đánh giá' );
$rate_input = elgg_view ( 'input/star', array (
		'name' => "rate",
		'checked' => $rate
) );

// add skill from group
if (isset ( $vars ['group_guid'] )) {
	$group_guid = elgg_view ( 'input/hidden', array (
			'name' => "group_guid",
			'value' => $vars ['group_guid'] 
	) );
}

$submit = elgg_view ( 'input/submit', array (
		'value' => elgg_echo ( 'Lưu' ) 
) );

echo <<<___HTML
<div>
	<label>$title_label</label>
	$title_input
<div>
<div>
	<label>$rate_label &nbsp $rate_input</label>
	
</div><br>
<div>
	<label>$descp_label</label>
	$descp_input
</div>
<div>
	$group_guid
	$skill_guid
	$submit
</div>
___HTML;

?>